package com.hitqz.robot.camera.common;

import com.google.common.collect.Maps;
import com.hitqz.robot.camera.lib.callback.fCaptureReceiveCB;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.locks.Lock;
@Component
public class Constant {

    /**
     * 大华登录句柄
     */
//    public static Map<String, NetSDKLib.LLong> ROBOT_DH_USERID_MAP = new HashMap<>();

    public static Map<String, CameraDriver> IP_CAMERA_DRIVER_MAP = new HashMap<>();

    /**
     * 抓图回调函数
     */
    public static fCaptureReceiveCB  m_CaptureReceiveCB = new fCaptureReceiveCB();

    public static String CAMERA_SERVER_HOST;

    @Value("${camera.serve.host}")
    public void setCameraServerHost(String host) {
        Constant.CAMERA_SERVER_HOST = host;
    }

    /**
     * 大华抓图路径
     */
    public static Map<String, String> ROBOT_DH_PICTURE_URL = new HashMap<>();

    /**
     * 抓图
     */
    public static Map<Long, Lock> ROBOT_DH_TAKE_PICTURE_LOCK = Maps.newConcurrentMap();


}
